package pr.iceworld.fernando.entity;

import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;

import java.util.List;

@Data
@JsonInclude(JsonInclude.Include.NON_NULL)
public class Permission<Long> extends DefaultDateEntity implements IdEntity {
    private Long id;
    private String name;
    /**
     * 资源类型，[menu|button]
     */
    private String resourceType;
    /**
     * 资源路径
     */
    private String url;
    /**
     * 权限字符串,menu例子：role:*，button例子：role:create,role:update,role:delete,role:view
     */
    private String operation;

    private Long parentId;
    /**
     * 1/2
     */
    private String parentIds;
    /**
     * 排序，这个加上比较好，比如排序一下模块什么的
     */
    private Byte sequence;
    /**
     * 0: 不可用
     * 1: 可用
     */
    private Byte status = 0;
    private List<Role> roles;

}
